/**
 * Copyright (c) 2010 S9,Inc.All rights reserved.
 * Created by 2012-6-1 
 */
package cn.jdy.platform.service;

import cn.jdy.framework.db.hibernate.BaseDao;
import cn.jdy.platform.entity.ConfType;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 项目配置类型管理
 *
 * @author: wuzhiliang
 * @data: 2013-7-11
 */
@Service
public class ConfTypeService extends BaseDao<ConfType> {
  @Autowired
  private ConfService confService;
  
  /**
   * 根据项目id 删除配置项，并删除对应的配置子项
   * @param id
   */
  @Transactional
  public void deleteType(int id) {
    super.delete(id);
    confService.delete("typeid", Long.valueOf(id));//删除配置分类的时候同时删除对应的配置子项
  }
}
